package com.dragon.modules.yuegou.query.wallet;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.wallet.EntityCardRecordEntity;
import com.dragon.modules.yuegou.enums.wallet.EntityCardRecordStatus;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 实体卡生成记录 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2021-03-30 14:13:31
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class EntityCardRecordQuery extends EntityCardRecordEntity implements Query<EntityCardRecordEntity> {

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 悦卡模板id查询条件 */
	@JsonUnwrapped(prefix = "cardTemplateId")
	private Condition<String> cardTemplateIdCondition;

    /** 卡号查询条件 */
	@JsonUnwrapped(prefix = "cardNo")
	private Condition<String> cardNoCondition;

    /** 卡密码查询条件 */
	@JsonUnwrapped(prefix = "cardPwd")
	private Condition<String> cardPwdCondition;

    /** 悦卡余额查询条件 */
	@JsonUnwrapped(prefix = "remain")
	private Condition<BigDecimal> remainCondition;

    /** 悦卡总额（不变）查询条件 */
	@JsonUnwrapped(prefix = "amount")
	private Condition<BigDecimal> amountCondition;

    /** 版本查询条件 */
	@JsonUnwrapped(prefix = "version")
	private Condition<Integer> versionCondition;

    /** 开始日期查询条件 */
	@JsonUnwrapped(prefix = "startDate")
	private Condition<LocalDate> startDateCondition;

    /** 结束日期查询条件 */
	@JsonUnwrapped(prefix = "endDate")
	private Condition<LocalDate> endDateCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 会员id 绑卡之后插入查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

    /** 会员悦卡id查询条件 */
	@JsonUnwrapped(prefix = "memberCardId")
	private Condition<String> memberCardIdCondition;

    /** 会员钱包id查询条件 */
	@JsonUnwrapped(prefix = "memberWalletId")
	private Condition<String> memberWalletIdCondition;

    /** [枚举]激活状态：0-未激活-UNACTIVATED、1-激活-ACTIVATED、2-已注销-CANCELLED查询条件 */
	@JsonUnwrapped(prefix = "status")
	private Condition<EntityCardRecordStatus> statusCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public EntityCardRecordQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public EntityCardRecordQuery(EntityCardRecordEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public EntityCardRecordQuery(EntityCardRecordQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.cardTemplateIdCondition != null) {
			this.cardTemplateIdCondition = other.cardTemplateIdCondition.copy();
		}
		if(other.cardNoCondition != null) {
			this.cardNoCondition = other.cardNoCondition.copy();
		}
		if(other.cardPwdCondition != null) {
			this.cardPwdCondition = other.cardPwdCondition.copy();
		}
		if(other.remainCondition != null) {
			this.remainCondition = other.remainCondition.copy();
		}
		if(other.amountCondition != null) {
			this.amountCondition = other.amountCondition.copy();
		}
		if(other.versionCondition != null) {
			this.versionCondition = other.versionCondition.copy();
		}
		if(other.startDateCondition != null) {
			this.startDateCondition = other.startDateCondition.copy();
		}
		if(other.endDateCondition != null) {
			this.endDateCondition = other.endDateCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if(other.memberCardIdCondition != null) {
			this.memberCardIdCondition = other.memberCardIdCondition.copy();
		}
		if(other.memberWalletIdCondition != null) {
			this.memberWalletIdCondition = other.memberWalletIdCondition.copy();
		}
		if(other.statusCondition != null) {
			this.statusCondition = other.statusCondition.copy();
		}
	}

	@Override
	public QueryWrapper<EntityCardRecordEntity> toQueryWrapper() {
		QueryWrapper<EntityCardRecordEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (cardTemplateIdCondition != null) {
			cardTemplateIdCondition.toWrapper(wrapper, COL_CARD_TEMPLATE_ID);
		}
		if (cardNoCondition != null) {
			cardNoCondition.toWrapper(wrapper, COL_CARD_NO);
		}
		if (cardPwdCondition != null) {
			cardPwdCondition.toWrapper(wrapper, COL_CARD_PWD);
		}
		if (remainCondition != null) {
			remainCondition.toWrapper(wrapper, COL_REMAIN);
		}
		if (amountCondition != null) {
			amountCondition.toWrapper(wrapper, COL_AMOUNT);
		}
		if (versionCondition != null) {
			versionCondition.toWrapper(wrapper, COL_VERSION);
		}
		if (startDateCondition != null) {
			startDateCondition.toWrapper(wrapper, COL_START_DATE);
		}
		if (endDateCondition != null) {
			endDateCondition.toWrapper(wrapper, COL_END_DATE);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (memberCardIdCondition != null) {
			memberCardIdCondition.toWrapper(wrapper, COL_MEMBER_CARD_ID);
		}
		if (memberWalletIdCondition != null) {
			memberWalletIdCondition.toWrapper(wrapper, COL_MEMBER_WALLET_ID);
		}
		if (statusCondition != null) {
			statusCondition.toWrapper(wrapper, COL_STATUS);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回悦卡模板id查询条件
	 * 
	 * @return cardTemplateIdCondition 悦卡模板id查询条件
	 */
	public Condition<String> cardTemplateId() {
		this.cardTemplateIdCondition = new Condition<>();
		return this.cardTemplateIdCondition;
	}
	
	/**
	 * 获取悦卡模板id查询条件
	 * 
	 * @return cardTemplateIdCondition 悦卡模板id查询条件
	 */
	public Condition<String> getCardTemplateIdCondition() {
		return cardTemplateIdCondition;
	}

	/**
	 * 设置悦卡模板id查询条件
	 * 
	 * @param cardTemplateIdCondition 悦卡模板id查询条件
	 */
	public void setCardTemplateIdCondition(Condition<String> cardTemplateIdCondition) {
		this.cardTemplateIdCondition = cardTemplateIdCondition;
	}

	/**
	 * 构造并返回卡号查询条件
	 * 
	 * @return cardNoCondition 卡号查询条件
	 */
	public Condition<String> cardNo() {
		this.cardNoCondition = new Condition<>();
		return this.cardNoCondition;
	}
	
	/**
	 * 获取卡号查询条件
	 * 
	 * @return cardNoCondition 卡号查询条件
	 */
	public Condition<String> getCardNoCondition() {
		return cardNoCondition;
	}

	/**
	 * 设置卡号查询条件
	 * 
	 * @param cardNoCondition 卡号查询条件
	 */
	public void setCardNoCondition(Condition<String> cardNoCondition) {
		this.cardNoCondition = cardNoCondition;
	}

	/**
	 * 构造并返回卡密码查询条件
	 * 
	 * @return cardPwdCondition 卡密码查询条件
	 */
	public Condition<String> cardPwd() {
		this.cardPwdCondition = new Condition<>();
		return this.cardPwdCondition;
	}
	
	/**
	 * 获取卡密码查询条件
	 * 
	 * @return cardPwdCondition 卡密码查询条件
	 */
	public Condition<String> getCardPwdCondition() {
		return cardPwdCondition;
	}

	/**
	 * 设置卡密码查询条件
	 * 
	 * @param cardPwdCondition 卡密码查询条件
	 */
	public void setCardPwdCondition(Condition<String> cardPwdCondition) {
		this.cardPwdCondition = cardPwdCondition;
	}

	/**
	 * 构造并返回悦卡余额查询条件
	 * 
	 * @return remainCondition 悦卡余额查询条件
	 */
	public Condition<BigDecimal> remain() {
		this.remainCondition = new Condition<>();
		return this.remainCondition;
	}
	
	/**
	 * 获取悦卡余额查询条件
	 * 
	 * @return remainCondition 悦卡余额查询条件
	 */
	public Condition<BigDecimal> getRemainCondition() {
		return remainCondition;
	}

	/**
	 * 设置悦卡余额查询条件
	 * 
	 * @param remainCondition 悦卡余额查询条件
	 */
	public void setRemainCondition(Condition<BigDecimal> remainCondition) {
		this.remainCondition = remainCondition;
	}

	/**
	 * 构造并返回悦卡总额（不变）查询条件
	 * 
	 * @return amountCondition 悦卡总额（不变）查询条件
	 */
	public Condition<BigDecimal> amount() {
		this.amountCondition = new Condition<>();
		return this.amountCondition;
	}
	
	/**
	 * 获取悦卡总额（不变）查询条件
	 * 
	 * @return amountCondition 悦卡总额（不变）查询条件
	 */
	public Condition<BigDecimal> getAmountCondition() {
		return amountCondition;
	}

	/**
	 * 设置悦卡总额（不变）查询条件
	 * 
	 * @param amountCondition 悦卡总额（不变）查询条件
	 */
	public void setAmountCondition(Condition<BigDecimal> amountCondition) {
		this.amountCondition = amountCondition;
	}

	/**
	 * 构造并返回版本查询条件
	 * 
	 * @return versionCondition 版本查询条件
	 */
	public Condition<Integer> version() {
		this.versionCondition = new Condition<>();
		return this.versionCondition;
	}
	
	/**
	 * 获取版本查询条件
	 * 
	 * @return versionCondition 版本查询条件
	 */
	public Condition<Integer> getVersionCondition() {
		return versionCondition;
	}

	/**
	 * 设置版本查询条件
	 * 
	 * @param versionCondition 版本查询条件
	 */
	public void setVersionCondition(Condition<Integer> versionCondition) {
		this.versionCondition = versionCondition;
	}

	/**
	 * 构造并返回开始日期查询条件
	 * 
	 * @return startDateCondition 开始日期查询条件
	 */
	public Condition<LocalDate> startDate() {
		this.startDateCondition = new Condition<>();
		return this.startDateCondition;
	}
	
	/**
	 * 获取开始日期查询条件
	 * 
	 * @return startDateCondition 开始日期查询条件
	 */
	public Condition<LocalDate> getStartDateCondition() {
		return startDateCondition;
	}

	/**
	 * 设置开始日期查询条件
	 * 
	 * @param startDateCondition 开始日期查询条件
	 */
	public void setStartDateCondition(Condition<LocalDate> startDateCondition) {
		this.startDateCondition = startDateCondition;
	}

	/**
	 * 构造并返回结束日期查询条件
	 * 
	 * @return endDateCondition 结束日期查询条件
	 */
	public Condition<LocalDate> endDate() {
		this.endDateCondition = new Condition<>();
		return this.endDateCondition;
	}
	
	/**
	 * 获取结束日期查询条件
	 * 
	 * @return endDateCondition 结束日期查询条件
	 */
	public Condition<LocalDate> getEndDateCondition() {
		return endDateCondition;
	}

	/**
	 * 设置结束日期查询条件
	 * 
	 * @param endDateCondition 结束日期查询条件
	 */
	public void setEndDateCondition(Condition<LocalDate> endDateCondition) {
		this.endDateCondition = endDateCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回会员id 绑卡之后插入查询条件
	 * 
	 * @return memberIdCondition 会员id 绑卡之后插入查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}
	
	/**
	 * 获取会员id 绑卡之后插入查询条件
	 * 
	 * @return memberIdCondition 会员id 绑卡之后插入查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置会员id 绑卡之后插入查询条件
	 * 
	 * @param memberIdCondition 会员id 绑卡之后插入查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回会员悦卡id查询条件
	 * 
	 * @return memberCardIdCondition 会员悦卡id查询条件
	 */
	public Condition<String> memberCardId() {
		this.memberCardIdCondition = new Condition<>();
		return this.memberCardIdCondition;
	}
	
	/**
	 * 获取会员悦卡id查询条件
	 * 
	 * @return memberCardIdCondition 会员悦卡id查询条件
	 */
	public Condition<String> getMemberCardIdCondition() {
		return memberCardIdCondition;
	}

	/**
	 * 设置会员悦卡id查询条件
	 * 
	 * @param memberCardIdCondition 会员悦卡id查询条件
	 */
	public void setMemberCardIdCondition(Condition<String> memberCardIdCondition) {
		this.memberCardIdCondition = memberCardIdCondition;
	}

	/**
	 * 构造并返回会员钱包id查询条件
	 * 
	 * @return memberWalletIdCondition 会员钱包id查询条件
	 */
	public Condition<String> memberWalletId() {
		this.memberWalletIdCondition = new Condition<>();
		return this.memberWalletIdCondition;
	}
	
	/**
	 * 获取会员钱包id查询条件
	 * 
	 * @return memberWalletIdCondition 会员钱包id查询条件
	 */
	public Condition<String> getMemberWalletIdCondition() {
		return memberWalletIdCondition;
	}

	/**
	 * 设置会员钱包id查询条件
	 * 
	 * @param memberWalletIdCondition 会员钱包id查询条件
	 */
	public void setMemberWalletIdCondition(Condition<String> memberWalletIdCondition) {
		this.memberWalletIdCondition = memberWalletIdCondition;
	}

	/**
	 * 构造并返回[枚举]激活状态：0-未激活-UNACTIVATED、1-激活-ACTIVATED、2-已注销-CANCELLED查询条件
	 * 
	 * @return statusCondition [枚举]激活状态：0-未激活-UNACTIVATED、1-激活-ACTIVATED、2-已注销-CANCELLED查询条件
	 */
	public Condition<EntityCardRecordStatus> status() {
		this.statusCondition = new Condition<>();
		return this.statusCondition;
	}
	
	/**
	 * 获取[枚举]激活状态：0-未激活-UNACTIVATED、1-激活-ACTIVATED、2-已注销-CANCELLED查询条件
	 * 
	 * @return statusCondition [枚举]激活状态：0-未激活-UNACTIVATED、1-激活-ACTIVATED、2-已注销-CANCELLED查询条件
	 */
	public Condition<EntityCardRecordStatus> getStatusCondition() {
		return statusCondition;
	}

	/**
	 * 设置[枚举]激活状态：0-未激活-UNACTIVATED、1-激活-ACTIVATED、2-已注销-CANCELLED查询条件
	 * 
	 * @param statusCondition [枚举]激活状态：0-未激活-UNACTIVATED、1-激活-ACTIVATED、2-已注销-CANCELLED查询条件
	 */
	public void setStatusCondition(Condition<EntityCardRecordStatus> statusCondition) {
		this.statusCondition = statusCondition;
	}

}
